#pragma once
#ifndef __MATERIAL__COMPILER__HH__
#define __MATERIAL__COMPILER__HH__

#include <Ogre.h>
#include <LitExceptions.h>
#include <LitStream.h>
#include <LitFileSystem.h>
#include <LitEditorPrerequisites.h>

namespace Lit
{
	class CScriptParser;
	namespace Editor
	{
		namespace Material
		{
			class TemplateGenerator;
			class Compiler
			{
				std::string mResGroup;

			public:
				Compiler(void);
				~Compiler(void);
				
				void setResourceGroup( const std::string &name );
				const std::string &getResourceGroup() const;

				bool matchesExtension( const std::string &name, const std::string &ext ) const;
				
				Ogre::GpuProgramPtr compileProgram( const std::string &name, const std::string &text );
				Ogre::MaterialPtr compileMaterial( const std::string &name, const std::string &text );

				static std::string DEFAULT_RESOURCE_GROUP;
			};
		};
	};
};

#endif

